package com.mytrip.model;

import java.math.BigDecimal;
import java.util.Date;

import com.mytrip.util.Caches;

public class OrderFlight extends BaseModelAdapter{
	private static final long serialVersionUID = 6824220599609319389L;

	public static final String ORDER_STATUS_INIT = "0";

	public static final String ORDER_STATUS_PAYING = "1";

	public static final String ORDER_STATUS_PAY_SUCCESS = "2";

	public static final String ORDER_STATUS_PAY_FAILED = "3";

	public String getOrderStatusCn(){
		if (ORDER_STATUS_INIT.equals(orderStatus)) {
			return "未付款";
		} else if (ORDER_STATUS_PAYING.equals(orderStatus)) {
			return "付款中";
		} else if (ORDER_STATUS_PAY_SUCCESS.equals(orderStatus)) {
			return "付款成功";
		} else if (ORDER_STATUS_PAY_FAILED.equals(orderStatus)) {
			return "付款失败";
		}
		return "";
	}

	public String getAirlineCn(){
		if (airline == null || "".equals(airline)) {
			return "";
		}
		String res = "";
		for (FlightCompany fc : Caches.flightCompanyList) {
			if (airline.equals(fc.getCompanyCode())) {
				res = fc.getCompanyName();
				break;
			}
		}
		return res;
	}

	public String getFromPortCn(){
		if (fromPort == null || "".equals(fromPort)) {
			return "";
		}
		String res = "";
		for (FlightCity fc : Caches.flightCityList) {
			if (fromPort.equals(fc.getCity3code())) {
				res = fc.getAirportName();
				break;
			}
		}
		return res;
	}

	public String getToPortCn(){
		if (toPort == null || "".equals(toPort)) {
			return "";
		}
		String res = "";
		for (FlightCity fc : Caches.flightCityList) {
			if (toPort.equals(fc.getCity3code())) {
				res = fc.getAirportName();
				break;
			}
		}
		return res;
	}
    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private Integer id;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.flight_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private Date flightTime;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.arrive_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private Date arriveTime;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.airline
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String airline;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.flight_number
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String flightNumber;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.order_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private Date orderTime;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.order_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private BigDecimal orderFee;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.order_status
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String orderStatus;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.people_info
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String peopleInfo;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.pnr_no
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String pnrNo;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.tx
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String tx;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.tc
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String tc;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.order_id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String orderId;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.uid
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private Integer uid;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.from_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String fromPort;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.to_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private String toPort;

    /**
     * This field was generated by Apache iBATIS ibator.
     * This field corresponds to the database column order_flight.pay_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    private BigDecimal payFee;
    
    private String deliveryAddress;
    private String consignee;
    private String consigneePhone;
    private String deliveryZipcode;

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.id
     *
     * @return the value of order_flight.id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.id
     *
     * @param id the value for order_flight.id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.flight_time
     *
     * @return the value of order_flight.flight_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public Date getFlightTime() {
        return flightTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.flight_time
     *
     * @param flightTime the value for order_flight.flight_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setFlightTime(Date flightTime) {
        this.flightTime = flightTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.arrive_time
     *
     * @return the value of order_flight.arrive_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public Date getArriveTime() {
        return arriveTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.arrive_time
     *
     * @param arriveTime the value for order_flight.arrive_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setArriveTime(Date arriveTime) {
        this.arriveTime = arriveTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.airline
     *
     * @return the value of order_flight.airline
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getAirline() {
        return airline;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.airline
     *
     * @param airline the value for order_flight.airline
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setAirline(String airline) {
        this.airline = airline == null ? null : airline.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.flight_number
     *
     * @return the value of order_flight.flight_number
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getFlightNumber() {
        return flightNumber;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.flight_number
     *
     * @param flightNumber the value for order_flight.flight_number
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setFlightNumber(String flightNumber) {
        this.flightNumber = flightNumber == null ? null : flightNumber.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.order_time
     *
     * @return the value of order_flight.order_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public Date getOrderTime() {
        return orderTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.order_time
     *
     * @param orderTime the value for order_flight.order_time
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.order_fee
     *
     * @return the value of order_flight.order_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public BigDecimal getOrderFee() {
        return orderFee;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.order_fee
     *
     * @param orderFee the value for order_flight.order_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setOrderFee(BigDecimal orderFee) {
        this.orderFee = orderFee;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.order_status
     *
     * @return the value of order_flight.order_status
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getOrderStatus() {
        return orderStatus;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.order_status
     *
     * @param orderStatus the value for order_flight.order_status
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.people_info
     *
     * @return the value of order_flight.people_info
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getPeopleInfo() {
        return peopleInfo;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.people_info
     *
     * @param peopleInfo the value for order_flight.people_info
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setPeopleInfo(String peopleInfo) {
        this.peopleInfo = peopleInfo == null ? null : peopleInfo.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.pnr_no
     *
     * @return the value of order_flight.pnr_no
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getPnrNo() {
        return pnrNo;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.pnr_no
     *
     * @param pnrNo the value for order_flight.pnr_no
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setPnrNo(String pnrNo) {
        this.pnrNo = pnrNo == null ? null : pnrNo.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.tx
     *
     * @return the value of order_flight.tx
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getTx() {
        return tx;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.tx
     *
     * @param tx the value for order_flight.tx
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setTx(String tx) {
        this.tx = tx == null ? null : tx.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.tc
     *
     * @return the value of order_flight.tc
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getTc() {
        return tc;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.tc
     *
     * @param tc the value for order_flight.tc
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setTc(String tc) {
        this.tc = tc == null ? null : tc.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.order_id
     *
     * @return the value of order_flight.order_id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getOrderId() {
        return orderId;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.order_id
     *
     * @param orderId the value for order_flight.order_id
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.uid
     *
     * @return the value of order_flight.uid
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public Integer getUid() {
        return uid;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.uid
     *
     * @param uid the value for order_flight.uid
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.from_port
     *
     * @return the value of order_flight.from_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getFromPort() {
        return fromPort;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.from_port
     *
     * @param fromPort the value for order_flight.from_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setFromPort(String fromPort) {
        this.fromPort = fromPort == null ? null : fromPort.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.to_port
     *
     * @return the value of order_flight.to_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public String getToPort() {
        return toPort;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.to_port
     *
     * @param toPort the value for order_flight.to_port
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setToPort(String toPort) {
        this.toPort = toPort == null ? null : toPort.trim();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method returns the value of the database column order_flight.pay_fee
     *
     * @return the value of order_flight.pay_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public BigDecimal getPayFee() {
        return payFee;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method sets the value of the database column order_flight.pay_fee
     *
     * @param payFee the value for order_flight.pay_fee
     *
     * @ibatorgenerated Sun Jan 15 14:52:10 CST 2012
     */
    public void setPayFee(BigDecimal payFee) {
        this.payFee = payFee;
    }

	public String getDeliveryAddress(){
		return deliveryAddress;
	}

	public void setDeliveryAddress(String deliveryAddress){
		this.deliveryAddress = deliveryAddress;
	}

	public String getConsignee(){
		return consignee;
	}

	public void setConsignee(String consignee){
		this.consignee = consignee;
	}

	public String getConsigneePhone(){
		return consigneePhone;
	}

	public void setConsigneePhone(String consigneePhone){
		this.consigneePhone = consigneePhone;
	}

	public String getDeliveryZipcode(){
		return deliveryZipcode;
	}

	public void setDeliveryZipcode(String deliveryZipcode){
		this.deliveryZipcode = deliveryZipcode;
	}
}